The advent of multi-function copying machines, network scanners, and printers has made it possible to freely exchange images with computers through networks. These devices generally use image compression techniques to reduce the load on the networks. In recent years, irreversible JPEG compression is often used as an image compression technique for multilevel images (color images). In this compression method, however, the amount of compressed data cannot be known before all the image data is actually compressed. This technique is therefore supposed to be inappropriate to a scanning system for compressing an image in real time because it cannot be known whether the image data can be completely stored in an image memory prepared in advance.
In another method, even when compressed data is larger in size than the memory capacity ensured to hold the image and cannot be completely stored, that amount of compressed data is measured, the necessary memory capacity is ensured, and then, scanning is performed for the second time to obtain image data. However, if the measured amount of compressed data exceeds the available memory capacity, the image cannot be acquired.